const express = require('express');

const route = express.Router();

//all 方法  所有
route.all('/admin', (request, response) => {
    response.end('admin page');
});

route.all('/abc', (request, response) => {
    response.end('abc abc abc');
});

//404 配置  * 所有 通配符
route.all('*', (request, response) => {
    response.statusCode = 404;
    response.end('<h1>404 Not Found</h1>');
});

module.exports = route;